package smartlifev30.com.sdk.api;

import android.util.Log;

import smartlifev30.com.sdk.util.MsgIdBuilder;
import smartlifev30.com.sdk.net.baiwei.BaseResponseListen;


/**
 *
 * @author tys
 * @date 2018/8/12
 */

public abstract class CallBack<Response> extends BaseResponseListen<Response> {

    public CallBack() {
        super(MsgIdBuilder.build());
    }

    public CallBack(String msgId) {
        super(msgId);
    }

    public CallBack(String msgId, String detailMessage) {
        super(msgId, detailMessage);
    }

    public CallBack(String msgId, String detailMessage, int delayTime) {
        super(msgId, detailMessage, delayTime);
    }

    @Override
    protected void onTimeOut(String detailMessage) {
        Log.e("0-0-", "time out" + detailMessage);
    }

    @Override
    protected void onFailed(Throwable throwable, int code) {
        Log.e("0-0-", "failed:"+throwable.getMessage() +" _ "+ code);
    }

}
